import request from '@/config/axios'
// 问题列表
export const getDefectList = async (params) => {
  return await request.get({ url: '/bug/bug-info/page', params })
}
// 创建问题
export const createDefect = async (data) => {
  return await request.post({ url: '/bug/bug-info/create', data, headersType: 'multipart/form-data' })
}
// 更新问题
export const updateDefect = async (data) => {
  return await request.put({ url: '/bug/bug-info/update', data, headersType: 'multipart/form-data' })
}
// 删除问题
export const deleteDefect = async (data) => {
  return await request.delete({ url: '/bug/bug-info/delete?id=' + data.id })
}
// 问题详情
export const getDefectInfo = async (params) => {
  return await request.get({ url: '/bug/bug-info/get', params })
}
// 上传
export const upload = async (data) => {
  return await request.upload({ url: '/bug/bug-info/upload', data })
}
// 问题日志
export const getDefectLogList = async (params) => {
  return await request.get({ url: '/bug/bug-log/get', params })
}
// 创建问题日志
export const createDefectLog = async (data) => {
  return await request.post({ url: '/bug/bug-log/create', data, headersType: 'multipart/form-data' })
}
// 根据用例标识获取其他字段信息
export const getTestCaseByLogo = async (params)=>{
  return await request.get({ url: '/bug/bug-info/get/testcase', params })
}
